Conversation
vihaan27
left a comment
There was a problem hiding this comment.
Overall, looks good and follows convention generally. Be careful about if-else statements.
src/main/java/Pixy.java
Outdated
| System.out.println((i + 1) + ".[" + tasks[i].getStatusIcon() + "] " + tasks[i].description); | ||
| } | ||
| } | ||
| else if (command.contains("unmark")) { |
There was a problem hiding this comment.
else-if statements should be on previous line (same line as if-block closing bracket)
src/main/java/Pixy.java
Outdated
| } | ||
| System.out.println("Bye. Hope to see you again soon!"); | ||
| } | ||
| } |
There was a problem hiding this comment.
LGTM, well named variables and followed conventions
src/main/java/Pixy.java
Outdated
| System.out.println("Nice! I've marked this task as done:"); | ||
| System.out.println((taskIndex) + ".[" + tasks[taskIndex - 1].getStatusIcon() + "] " + tasks[taskIndex - 1].description); | ||
| } | ||
| else { |
There was a problem hiding this comment.
else statement should also be on previous line
src/main/java/Task.java
Outdated
| public void setDone(boolean done) { | ||
| isDone = done; | ||
| } | ||
| } |
QuyDatNguyen
left a comment
There was a problem hiding this comment.
Overall, good work. However, the layout of the code can be further improved for better readability.
src/main/java/Pixy.java
Outdated
| public class Pixy { | ||
| public static void main(String[] args) { | ||
| Scanner in = new Scanner(System.in); | ||
| Task[] tasks = new Task[100]; |
src/main/java/Task.java
Outdated
| return (isDone ? "X" : " "); | ||
| } | ||
|
|
||
| public void setDone(boolean done) { |
There was a problem hiding this comment.
The naming of variable "done" should be more clear/ more "boolean"
src/main/java/Pixy.java
Outdated
| System.out.println("Hello! I'm Pixy"); | ||
| System.out.println("What can I do for you?"); | ||
| String command = in.nextLine(); | ||
| int tasksCounter = 0; |
There was a problem hiding this comment.
The lay out can be further improved by breaking the codes into different sections using spaces/ empty lines
src/main/java/Pixy.java
Outdated
| } | ||
| command = in.nextLine(); | ||
| } | ||
| System.out.println("Bye. Hope to see you again soon!"); |
There was a problem hiding this comment.
There is actually a bit of ambiguity on which command does this line responding too (I could not keep track of which command at this point)
src/main/java/pixy/task/Event.java
Outdated
|
|
||
| @Override | ||
| public String toString() { | ||
| return "[D]" + super.toString() + " (from: " + from + ", to: " + to + ")"; |
There was a problem hiding this comment.
Avoid usage of magic strings as much as possible.
Duke renamed to Pixy, implemented up to Level-3, A-CodingStandard.